/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

Ext.define("Market.controller.Comune",{
    extend: 'Ext.app.Controller',
    init: function(){
         this.control({
            'comunelist': {
                itemdblclick: this.editUser
            }
        });
        
    },
    
    editUser:  function(grid,record){
         var view = Ext.widget('comuneedit');

        view.down('form').loadRecord(record);
        
    },
    views: [
        'comune.List',
        'comune.Edit'
    ],
    stores: ['Comune'],
    models: ['Comune'],
    
    onPanelRendered: function(){
        alert('ciao');
    }
})